package cse.om.object;

import cse.om.vswn.Sensitivity;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;

public class SensitivityByDay {
	
	private final Date _date;
	private final List<Sensitivity> _list;
	
	public SensitivityByDay(Date date) {
		_date = date;
		_list = new ArrayList<>();
	}
	
	public SensitivityByDay(Date date, List<Sensitivity> list) {
		_date = date;
		_list = list;
	}
	
	public void addSensitivity(Sensitivity s) {
		_list.add(s);
	}
	
	public List<Sensitivity> getSensitivityList() {
		return _list;
	}
	
	public Date getDate() {
		return _date;
	}
	
	@Override
	public int hashCode() {
		return _date.hashCode();
	}

	@Override
	public boolean equals(Object obj) {
		if (obj == null || getClass() != obj.getClass()) {
			return false;
		}
		final SensitivityByDay other = (SensitivityByDay) obj;
		return Objects.equals(this._date, other._date);
	}
}
